package com.keyancompany.zhongbaopingtai.api;

import com.keyancompany.zhongbaopingtai.ConstansUrl;
import com.keyancompany.zhongbaopingtai.ZBApplication;
import com.keyancompany.zhongbaopingtai.listener.IAsyncHttpResponseHandler;
import com.keyancompany.zhongbaopingtai.listener.LoadingHanlder;
import com.keyancompany.zhongbaopingtai.utils.AppUtils;
import com.loopj.android.http.RequestParams;

/**
 * Created by Gia on 2016/10/10.
 */
public class UpdateAPI extends BaseAPI {

    public static final int UPDATE_VERSION = 0X611;


    /**
     * 版本升级
     *
     * @param handler
     * @param loading
     */
    public static final void updateApp(IAsyncHttpResponseHandler handler, LoadingHanlder loading) {

        RequestParams params = new RequestParams();
        params.put("appType", "0");
        params.put("version", AppUtils.getVersionName(ZBApplication.getInstance()));


        post(ConstansUrl.UPDATE_VERSION, params, handler, UPDATE_VERSION, loading);

    }


}
